home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-28 | 1.3 KB | 68 lines | [TEXT/CWIE] |
- // Source code for Klingon Clock. Copyright (C) 1996-1997
- // Charles H. Hemstreet IV
- //
- // Started at MacHack 1996
- // Completed at MacHack 1997
- //
- // Best thanks to:
- // My wife Regie, son Chad and baby
- // Other thanks to Elden Wood and Bob Clark
- //
- // This code is distributed "as-is" and implies no warranty or guarantee.
-
-
- #ifndef __MAINUTIL__
- #include "mainUtil.h"
- #endif
-
-
- void gestaltChecks(void)
- {
- OSErr initAppErr;
- long gestaltAnswer;
-
- initAppErr = Gestalt(gestaltVersion, &gestaltAnswer);
- assert(initAppErr == noErr);
-
- if (initAppErr)
- {
- SysBeep(1);
- ExitToShell();
- // This program must run on a machine that is new enough to support the gestalt manager.
- }
-
- initAppErr = Gestalt(gestaltSystemVersion, &gestaltAnswer);
- assert(initAppErr == noErr);
-
- if (initAppErr)
- {
- SysBeep(1);
- ExitToShell();
- }
-
- if (gestaltAnswer < 0x0700)
- {
- SysBeep(1);
- ExitToShell();
- // This program requires System 7.0 or higher to run",0,false,false,true);
- }
- }
-
-
- OSErr DoAllPeriodicProcessing(void)
- {
- short MySndID[kMaxArray];
- short MySndID1[kMaxArray];
- short MySndID2[kMaxArray];
- short cur_time[kMaxArray];
- OSErr myErr = noErr;
-
- getTime(cur_time);
- myErr = makeSentence(cur_time, MySndID, MySndID1, MySndID2);
- assert(myErr == noErr);
- myErr = speakSentence(MySndID, MySndID1, MySndID2);
- assert(myErr == noErr);
-
- return myErr;
- }
-